{% extends '../layout.html' %}
<!-- header-start -->
{% block head %}
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    {% parent %}
{% endblock %}
<!-- header-end -->

<!-- body-start -->
{% block content %}
    <div class=" Hr_MyHaier_YJ Hr_MyHaier_NYJ">
        <div id="weixin-tip"><p><img src="/images/my-haier/live_weixin.png" alt="微信打开"/><span id="close" title="关闭" class="close">×</span></p></div>
        <main class="Hr_MyHaier_new_yj_Name">
            <img src="/images/my-haier/new_title.png" alt="" class="title">

            <section class="brand">
                <div class="new_yj_left">
                    <img src="{{ thatData.p_image|default('/images/my-haier/default.jpg') }}" alt="">
                </div>
                <div class="new_yj_right">
                    <p class="color">感谢购买{{ thatData.p_group_name }}</p>
                    <p class="new_yj_model">{{ thatData.p_brand }}{{ thatData.p_type }}</p>
                    <div class="new_yj_line"></div>
                    {#<p class="similar_model">{{ thatData.p_trait|default('&nbsp;')|raw }}<p>#}
                    <p class="selling_point">{{ thatData.selling_point|default('&nbsp;')|raw }}</p>
                </div>
            </section>
            <section>
                <div class="new_j_four">
                    <div class="new_yj_div">
                        <a href="http://www.vv3c.com/html5/vv3c2017/haier-xqg80.html" class="new_bg_1">
                            <img src="/images/my-haier/cpsm.png" alt="">
                            <span class="tip">产品说明</span>
                        </a>
                        {% if thatData.bind==true %}
                            <a class="new_bg_2" onclick="CommonJs.alert.show({title:'本产品您已获取过权益'})">
                                <img src="/images/my-haier/hqqy.png " alt="">
                                <span class="tip">获取权益</span>
                            </a>
                        {% else %}
                            {#<a href="http://tuser.haier.com/cnmobile/services_supports/product_reg/?fromApp=yes&appName=SCRM" class="new_bg_2">#}
                                {#<img src="/images/my-haier/hqqy.png " alt="">#}
                                {#<span class="tip">获取权益</span>#}
                            {#</a>#}
                            <a href="/bind-product" class="new_bg_2">
                                <img src="/images/my-haier/hqqy.png " alt="">
                                <span class="tip">获取权益</span>
                            </a>
                        {% endif %}
                        <a href="/clear-middle" class="new_bg_3">
                            <img src="/images/my-haier/bzbx.png " alt="">
                            <span class="tip">报装报修</span>
                        </a>
                        <a href="/personal-center" class="new_bg_4">
                            <img src="/images/my-haier/grzx.png " alt="">
                            <span class="tip">个人中心</span>
                        </a>
                        <div  class="new_yj_pic">
                            <a class="yj-logo" href="javascript:void(0)">
                                <img src="/images/my-haier/youjia.png" alt="">
                            </a>
                            <a href="http://image.haier.com/cnmobile/application/yyzxs/201503/P020161212346774298287.apk" id="android">安卓客户端</a>
                            <a href="https://itunes.apple.com/cn/app/u+zhi-hui-sheng-huo/id982191521?mt=8" id="ios">苹果客户端</a>
                        </div>
                    </div>
                </div>
            </section>
        </main>
    </div>
{% endblock %}
<!-- body-end -->
<!-- script-start -->
{% block script %}
    <script type="text/javascript" src="/js/base/app.js"></script>
    <script type="text/javascript" src="/js/my-haier/my-haier.js"></script>
    <script type="text/javascript">
        var is_weixin = (function() {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == "micromessenger") {
                return true;
            } else {
                return false;
            }
        })();
        window.onload = function(){
            var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
            var tip = document.getElementById('weixin-tip');
            var close = document.getElementById('close');
            var btn_android =$(".Hr_MyHaier_NYJ").find('#android');
            var btn_ios =$(".Hr_MyHaier_NYJ").find('#ios');
            console.log(winHeight);
            if(is_weixin){
                show_del();
            }
            function show_del(){
                var u = navigator.userAgent;
                if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机
                    btn_android.click( function(e){
                        tip.style.height = winHeight + 'px';
                        tip.style.display = 'block';
                        $("#android").attr("href","http://image.haier.com/cnmobile/application/yyzxs/201503/P020161212346774298287.apk");
                    });
                    close.onclick = function(){
                        tip.style.display = 'none';
                    }
                }
                if (u.indexOf('iPhone') > -1) {//苹果手机
                    btn_ios.click( function(e){
                        tip.style.height = winHeight + 'px';
                        tip.style.display = 'block';
                        $("#ios").attr("href","https://itunes.apple.com/cn/app/u+zhi-hui-sheng-huo/id982191521?mt=8");
                    });
                    close.onclick = function(){
                        tip.style.display = 'none';
                    }
                }
            }
        }
    </script>
    {% if not thatData.tm %}
        <script type="text/javascript">
            CommonJs.alert.show({
                "model":'error',
                "title": "系统提示",
                "content": "产品详情不存在"
            });
            setTimeout(function () {
                window.location.href="/login";
            },1700);
        </script>
    {% endif %}
{% endblock %}
<!-- script-end -->

